<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        
        <meta name="author" content="MkDocs Team">
        <link rel="canonical" href="https://www.mkdocs.org/user-guide/installation/">
        <link rel="shortcut icon" href="../../img/favicon.ico">
        <title>Installation - MkDocs</title>
        <link href="../../css/bootstrap.min.css" rel="stylesheet">
        <link href="../../css/font-awesome.min.css" rel="stylesheet">
        <link href="../../css/base.css" rel="stylesheet">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css">
        <link href="../../css/extra.css" rel="stylesheet">

        <script src="../../js/jquery-1.10.2.min.js" defer></script>
        <script src="../../js/bootstrap.min.js" defer></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/languages/yaml.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/languages/django.min.js"></script>
        <script>hljs.initHighlightingOnLoad();</script>
        <script async src="https://www.googletagmanager.com/gtag/js?id=G-274394082"></script>
        <script>
          window.dataLayer = window.dataLayer || [];
          function gtag(){dataLayer.push(arguments);}
          gtag('js', new Date());

          gtag('config', 'G-274394082');
        </script> 
    </head>

    <body>
        <div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
            <div class="container">
                <a class="navbar-brand" href="../..">MkDocs</a>
                <!-- Expander button -->
                <button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <!-- Expanded navigation -->
                <div id="navbar-collapse" class="navbar-collapse collapse">
                        <!-- Main navigation -->
                        <ul class="nav navbar-nav">
                            <li class="navitem">
                                <a href="../.." class="nav-link">Home</a>
                            </li>
                            <li class="navitem">
                                <a href="../../getting-started/" class="nav-link">Getting Started</a>
                            </li>
                            <li class="dropdown active">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">User Guide <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../" class="dropdown-item">Overview</a>
</li>
                                    
<li>
    <a href="./" class="dropdown-item active">Installation</a>
</li>
                                    
<li>
    <a href="../writing-your-docs/" class="dropdown-item">Writing Your Docs</a>
</li>
                                    
<li>
    <a href="../choosing-your-theme/" class="dropdown-item">Choosing Your Theme</a>
</li>
                                    
<li>
    <a href="../customizing-your-theme/" class="dropdown-item">Customizing Your Theme</a>
</li>
                                    
<li>
    <a href="../localizing-your-theme/" class="dropdown-item">Localizing Your Theme</a>
</li>
                                    
<li>
    <a href="../configuration/" class="dropdown-item">Configuration</a>
</li>
                                    
<li>
    <a href="../deploying-your-docs/" class="dropdown-item">Deploying Your Docs</a>
</li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">Developer Guide <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../../dev-guide/" class="dropdown-item">Overview</a>
</li>
                                    
<li>
    <a href="../../dev-guide/themes/" class="dropdown-item">Themes</a>
</li>
                                    
<li>
    <a href="../../dev-guide/translations/" class="dropdown-item">Translations</a>
</li>
                                    
<li>
    <a href="../../dev-guide/plugins/" class="dropdown-item">Plugins</a>
</li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">About <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../../about/release-notes/" class="dropdown-item">Release Notes</a>
</li>
                                    
<li>
    <a href="../../about/contributing/" class="dropdown-item">Contributing</a>
</li>
                                    
<li>
    <a href="../../about/license/" class="dropdown-item">License</a>
</li>
                                </ul>
                            </li>
                        </ul>

                    <ul class="nav navbar-nav ml-auto">
                        <li class="nav-item">
                            <a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
                                <i class="fa fa-search"></i> Search
                            </a>
                        </li>
                            <li class="nav-item">
                                <a rel="prev" href="../" class="nav-link">
                                    <i class="fa fa-arrow-left"></i> Previous
                                </a>
                            </li>
                            <li class="nav-item">
                                <a rel="next" href="../writing-your-docs/" class="nav-link">
                                    Next <i class="fa fa-arrow-right"></i>
                                </a>
                            </li>
                            <li class="nav-item">
                                <a href="https://gitee.com/fstongxue/aivideo.git" class="nav-link">Gitee</a>
                            </li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="container">
            <div class="row">
                    <div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
    <div class="navbar-header">
        <button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
            <span class="fa fa-angle-down"></span>
        </button>
    </div>

    
    <div id="toc-collapse" class="navbar-collapse collapse card bg-secondary">
        <ul class="nav flex-column">
            
            <li class="nav-item" data-level="1"><a href="#mkdocs-installation" class="nav-link">MkDocs Installation</a>
              <ul class="nav flex-column">
            <li class="nav-item" data-level="2"><a href="#requirements" class="nav-link">Requirements</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#installing-mkdocs" class="nav-link">Installing MkDocs</a>
              <ul class="nav flex-column">
              </ul>
            </li>
              </ul>
            </li>
        </ul>
    </div>
</div></div>
                    <div class="col-md-9" role="main">

<h1 id="mkdocs-installation">MkDocs Installation<a class="headerlink" href="#mkdocs-installation" title="Permanent link"></a></h1>
<p>A detailed guide.</p>
<hr />
<h2 id="requirements">Requirements<a class="headerlink" href="#requirements" title="Permanent link"></a></h2>
<p>MkDocs requires a recent version of <a href="https://www.python.org/">Python</a> and the the Python package
manager, <a href="https://pip.readthedocs.io/en/stable/installing/">pip</a>, to be installed on your system.</p>
<p>You can check if you already have these installed from the command line:</p>
<pre><code class="language-bash">$ python --version
Python 3.8.2
$ pip --version
pip 20.0.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
</code></pre>
<p>If you already have those packages installed, you may skip down to <a href="#installing-mkdocs">Installing
MkDocs</a>.</p>
<h3 id="installing-python">Installing Python<a class="headerlink" href="#installing-python" title="Permanent link"></a></h3>
<p>Install <a href="https://www.python.org/">Python</a> using your package manager of choice, or by downloading an
installer appropriate for your system from <a href="https://www.python.org/downloads/">python.org</a> and running it.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If you are installing Python on Windows, be sure to check the box to have
Python added to your PATH if the installer offers such an option (it's
normally off by default).</p>
<p><img alt="Add Python to PATH" src="../../img/win-py-install.png" /></p>
</div>
<h3 id="installing-pip">Installing pip<a class="headerlink" href="#installing-pip" title="Permanent link"></a></h3>
<p>If you're using a recent version of Python, the Python package manager, <a href="https://pip.readthedocs.io/en/stable/installing/">pip</a>,
is most likely installed by default. However, you may need to upgrade pip to the
lasted version:</p>
<pre><code class="language-bash">pip install --upgrade pip
</code></pre>
<p>If you need to install pip for the first time, download <a href="https://bootstrap.pypa.io/get-pip.py">get-pip.py</a>.
Then run the following command to install it:</p>
<pre><code class="language-bash">python get-pip.py
</code></pre>
<h2 id="installing-mkdocs">Installing MkDocs<a class="headerlink" href="#installing-mkdocs" title="Permanent link"></a></h2>
<p>Install the <code>mkdocs</code> package using pip:</p>
<pre><code class="language-bash">pip install mkdocs
</code></pre>
<p>You should now have the <code>mkdocs</code> command installed on your system. Run <code>mkdocs
--version</code> to check that everything worked okay.</p>
<pre><code class="language-bash">$ mkdocs --version
mkdocs, version 1.2.0 from /usr/local/lib/python3.8/site-packages/mkdocs (Python 3.8)
</code></pre>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If you would like manpages installed for MkDocs, the <a href="https://github.com/click-contrib/click-man">click-man</a> tool can
generate and install them for you. Simply run the following two commands:</p>
<pre><code>pip install click-man
click-man --target path/to/man/pages mkdocs
</code></pre>
<p>See the <a href="https://github.com/click-contrib/click-man#automatic-man-page-installation-with-setuptools-and-pip">click-man documentation</a> for an explanation of why manpages are
not automatically generated and installed by pip.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If you are using Windows, some of the above commands may not work
out-of-the-box.</p>
<p>A quick solution may be to preface every Python command with <code>python -m</code>
like this:</p>
<pre><code>python -m pip install mkdocs
python -m mkdocs
</code></pre>
<p>For a more permanent solution, you may need to edit your <code>PATH</code> environment
variable to include the <code>Scripts</code> directory of your Python installation.
Recent versions of Python include a script to do this for you. Navigate to
your Python installation directory (for example <code>C:\Python38\</code>), open the
<code>Tools</code>, then <code>Scripts</code> folder, and run the <code>win_add2path.py</code> file by double
clicking on it. Alternatively, you can download the <a href="https://github.com/python/cpython/blob/master/Tools/scripts/win_add2path.py">script</a> and run it
(<code>python win_add2path.py</code>).</p>
</div></div>
            </div>
        </div>

        <footer class="col-md-12">
            <hr>
                <p>Copyright &copy; 2014 <a href="https://twitter.com/_tomchristie">Tom Christie</a>, Maintained by the <a href="/about/release-notes/#maintenance-team">MkDocs Team</a>.</p>
            <p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
        </footer>
        <script>
            var base_url = "../..",
                shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
        </script>
        <script src="../../js/base.js" defer></script>
        <script src="../../search/main.js" defer></script>

        <div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="searchModalLabel">Search</h4>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            </div>
            <div class="modal-body">
                <p>From here you can search these documents. Enter your search terms below.</p>
                <form>
                    <div class="form-group">
                        <input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
                    </div>
                </form>
                <div id="mkdocs-search-results" data-no-results-text="No results found"></div>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            </div>
            <div class="modal-body">
              <table class="table">
                <thead>
                  <tr>
                    <th style="width: 20%;">Keys</th>
                    <th>Action</th>
                  </tr>
                </thead>
                <tbody>
                  <tr>
                    <td class="help shortcut"><kbd>?</kbd></td>
                    <td>Open this help</td>
                  </tr>
                  <tr>
                    <td class="next shortcut"><kbd>n</kbd></td>
                    <td>Next page</td>
                  </tr>
                  <tr>
                    <td class="prev shortcut"><kbd>p</kbd></td>
                    <td>Previous page</td>
                  </tr>
                  <tr>
                    <td class="search shortcut"><kbd>s</kbd></td>
                    <td>Search</td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div>

    </body>
</html>
